/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.tnmk.worktime.gui.tbl;

import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author tnmkhoi
 */
public class ButtonRenderer implements TableCellRenderer{
//  private static Logger log = Logger.getLogger(ButtonRenderer.class);
  private final JButton button;

  public ButtonRenderer(String label) {
    button = new JButton();
    ButtonFactory.decorateCellButtonByType(button, label);
  }

  @Override
  public Component getTableCellRendererComponent(JTable table,
          Object value,
          boolean isSelected,
          boolean hasFocus,
          int row, int column) {
    return button;
  }
}
